package com.github.ghsea.scheduler.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author guhai
 * @since 2021/6/18 0:28
 */
public class TaskSchedulerEntity implements Serializable {

    private Long id;

    private String server;

    private Date startTime;

    private Date heartbeatTime;

    private Date nextHeartbeatTime;

    private Date createTime;

    private int version;

    public TaskSchedulerEntity setId(Long id) {
        this.id = id;
        return this;
    }

    public TaskSchedulerEntity setServer(String server) {
        this.server = server;
        return this;
    }

    public TaskSchedulerEntity setStartTime(Date startTime) {
        this.startTime = startTime;
        return this;
    }

    public TaskSchedulerEntity setNextHeartbeatTime(Date nextHeartbeatTime) {
        this.nextHeartbeatTime = nextHeartbeatTime;
        return this;
    }

    public TaskSchedulerEntity setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public TaskSchedulerEntity setVersion(int version) {
        this.version = version;
        return this;
    }

    public Long getId() {
        return id;
    }

    public String getServer() {
        return server;
    }

    public Date getStartTime() {
        return startTime;
    }

    public Date getHeartbeatTime() {
        return heartbeatTime;
    }

    public TaskSchedulerEntity setHeartbeatTime(Date heartbeatTime) {
        this.heartbeatTime = heartbeatTime;
        return this;
    }

    public Date getNextHeartbeatTime() {
        return nextHeartbeatTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public int getVersion() {
        return version;
    }
}
